package DS0626;

public class Student {
    String name;
    int age;

    public Student(){};

    public Student(String name, int age){
        this.age  = age;
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "我的名字叫"+name+",今年"+age+"岁";
    }

    @Override
    public boolean equals(Object obj) {
        Student student = (Student) obj;
        return this.name.equals(student.name);
    }
}
